package Connection;

import javax.jws.WebService;


@WebService
public class Service {	
	
	DBConnect db = new DBConnect();
	
	public String login(String username, String password)
	{
		return db.login(username, password);
	}

	public boolean changePassword(String newpassword, String pid)
	{
		return db.changePassword(newpassword, pid);
	} 

	public Flight newReservation(Customer customer)
	{
		return new Flight();
	}

	public String viewTicket(String ticketnumber, String date)
	{
		return db.viewTicket(ticketnumber,date);
	}	
	
	public String createPerson(Person person)
	{
		return db.createPerson(person);
	}

	public String createCustomer(Customer customer)
	{
		return db.createCustomer(customer);
	}

	public String cancelReservation(String ticketnumber)
	{
		return new Customer().getStatus();
	}

	public String getAllCustomers(String alid, String date)
	{
		return db.getAllCustomers(alid,date);
	}

	public Customer[] getAllReservations(String alid, String date)
	{
		return new Customer[]{};
	}
	
	public boolean updateCustomer(Customer customer)
	{
		return db.updateCustomer(customer);
	}

	public boolean updatePerson(Person person)
	{
		return db.updatePerson(person);
	}

	public Flight[] getAllFlights(String alid, String date)
	{
		return new Flight[]{};
	}
	
	public Flight[] getFlights(String alid, String date, String source, String destination)
	{
		return db.getFlights(alid, date, source, destination);
	}
	
	public Customer getCustomer(String cid)
	{
		return db.getCustomer(cid);
	}

	public Person getPerson(String pid)
	{
		return db.getPerson(pid);
	}


	public String getCustomerById(String cid)
	{
		return db.getCustomerById(cid);
	}
	
	public String getCompleterCustomerDetails(String cid)
	{
		return db.getCompleterCustomerDetails(cid);
	}
	
	public String getCustTravelInfo(String cid)
	{
		return db.getCustTravelInfo(cid);
	}

	public String createEmployee(Staff staff)
	{
		return String.valueOf(new Staff().getSid());
	}
	
	public String deleteEmployee(String sid)
	{
		return new Staff().getStatus();
	}
	
	public Staff[] getAllEmployee(String alid, String status)
	{
		return new Staff[]{};
	}

	public Staff updateEmployee(Staff staff)
	{
		return new Staff();
	}
	
	public Flight updateFlight(String alid, String date)
	{
		return new Flight();
	}
	
	public Staff getEmployee(String sid)
	{
		return new Staff();
	}

	public Flight[] getAssignedFlights(String sid)
	{
		return new Flight[]{};
	}	
	
	public Person getPersonCustomer(String cid)
	{
		return db.getPersonCustomer(cid);
	}
	
	public Person updatePersonDetails(Person person)
	{
		return db.updatePersonDetails(person);
	}
}
